home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
Buch
/
Hops2.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-08
|
2KB
|
53 lines
//---------------------------------------------------------------------------
#include <vcl\vcl.h>
#pragma hdrstop
#include "Hops2.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
const String Pfad = "c:\\cpp\\buch\\"; // oder Pfad fⁿr Buch-CD
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Movie1 = new TMovie (this);
Movie1->Parent = Panel1;
Movie1->Stretch = true;
Movie1->SetSize (Rect(10,10,Panel1->Width-10,Panel1->Height-10));
// Anzeige-Hintergrund an Bild anpassen
Panel1->Color = clBlack;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ShowButtonClick(TObject *Sender)
{
Movie1->ShowImage (Pfad+"Hops1.bmp");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::HideButtonClick(TObject *Sender)
{
Movie1->HideImage ();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::MoveButtonClick(TObject *Sender)
{
Movie1->MoveImage (Pfad+"Hops2.bmp");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::TurnButtonClick(TObject *Sender)
{
Movie1->TurnImage (Pfad+"Hops5.bmp");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::EndButtonClick(TObject *Sender)
{
Close ();
}
//---------------------------------------------------------------------------